﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestMatrix.Model
{
    public class tblGlobalTestCaseAutomation : INotifyPropertyChanged, INotifyPropertyChanging
    {
        public tblGlobalTestCaseAutomation()
        {

        }

        public tblGlobalTestCaseAutomation(
            int id
            , string Financialyear
            , string Project
            , int Automated
            , int HaveAutomationValue
            , int NotAutomationValue
            , string AutomatedOfTotal
            , string AutomatedOfAutomatable

            )
        {
            this.ID = id;
            this.Financialyear = Financialyear;
            this.Project = Project;
            this.Automated = Automated;
            this.HaveAutomationValue = HaveAutomationValue;
            this.NotAutomationValue = NotAutomationValue;
            this.AutomatedOfTotal = AutomatedOfTotal;
            this.AutomatedOfAutomatable = AutomatedOfAutomatable;
        }

        private int _ID;

        public int ID
        {
            get { return _ID; }
            set
            {
                if (_ID != value)
                {
                    NotifyPropertyChanging("ID");
                    _ID = value;
                    NotifyPropertyChanged("ID");
                }
            }

        }


        private string _Financialyear;

        public string Financialyear
        {
            get { return _Financialyear; }
            set
            {
                if (_Financialyear != value)
                {
                    NotifyPropertyChanging("Financialyear");
                    _Financialyear = value;
                    NotifyPropertyChanged("Financialyear");
                }
            }
        }

        private string _Project;

        public string Project
        {
            get { return _Project; }
            set
            {
                if (_Project != value)
                {
                    NotifyPropertyChanging("Project");
                    _Project = value;
                    NotifyPropertyChanged("Project");
                }
            }
        }

        
        private int _Automated;

        public int Automated
        {
            get { return _Automated; }
            set
            {
                if (_Automated != value)
                {
                    NotifyPropertyChanging("Automated");
                    _Automated = value;
                    NotifyPropertyChanged("Automated");
                }
            }

        }

        private int _HaveAutomationValue;

        public int HaveAutomationValue
        {
            get { return _HaveAutomationValue; }
            set
            {
                if (_HaveAutomationValue != value)
                {
                    NotifyPropertyChanging("HaveAutomationValue");
                    _HaveAutomationValue = value;
                    NotifyPropertyChanged("HaveAutomationValue");
                }
            }

        }

        private int _NotAutomationValue;

        public int NotAutomationValue
        {
            get { return _NotAutomationValue; }
            set
            {
                if (_NotAutomationValue != value)
                {
                    NotifyPropertyChanging("NotAutomationValue");
                    _NotAutomationValue = value;
                    NotifyPropertyChanged("NotAutomationValue");
                }
            }

        }

        private string _AutomatedOfTotal;

        public string AutomatedOfTotal
        {
            get { return _AutomatedOfTotal; }
            set
            {
                if (_AutomatedOfTotal != value)
                {
                    NotifyPropertyChanging("AutomatedOfTotal");
                    _AutomatedOfTotal = value;
                    NotifyPropertyChanged("AutomatedOfTotal");
                }
            }

        }

        private string _AutomatedOfAutomatable;

        public string AutomatedOfAutomatable
        {
            get { return _AutomatedOfAutomatable; }
            set
            {
                if (_AutomatedOfAutomatable != value)
                {
                    NotifyPropertyChanging("AutomatedOfAutomatable");
                    _AutomatedOfAutomatable = value;
                    NotifyPropertyChanged("AutomatedOfAutomatable");
                }
            }

        }

        public event PropertyChangedEventHandler PropertyChanged;

        // Used to notify that a property changed
        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        // Used to notify that a property is about to change
        private void NotifyPropertyChanging(string propertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
            }

        }
    }
}
